#include "rrprim.h"

RRPrim::RRPrim()
{
    RRLight temp;
    temp.rrSetCoord(RRSetVec3(0.0f, 0.0f, 0.0f));
    temp.rrSetAmb(RRSetVec4(0.0f, 0.0f, 0.0f, 1.0f));
    temp.rrSetDiff(RRSetVec4(1.0f, 1.0f, 1.0f, 1.0f));
    temp.rrSetSpec(RRSetVec4(1.0f, 1.0f, 1.0f, 1.0f));

    light = temp;
}

RRPRIMTYPE RRPrim::rrGetType()
{
    return type;
}

bool RRPrim::rrGetRef()
{
    return reflection;
}

RRVec3 RRPrim::rrGetSize()
{
    return size;
}

RRVec3 RRPrim::rrGetCoord()
{
    return coord;
}

int RRPrim::rrGetRev()
{
    return reversal;
}

RRVec3 RRPrim::rrGetCross()
{
    return cross;
}

RRVec4 RRPrim::rrGetAmb()
{
    return amb;
}

RRVec4 RRPrim::rrGetdiff()
{
    return diff;
}

float RRPrim::rrGetSpec()
{
    return spec;
}

void RRPrim::rrSetPrimSet(RRPrimSet *arg)
{
    primset = arg;
}

bool RRPrim::rrGetTransp()
{
    return transparency;
}

void RRPrim::rrSetPrim(RRPrim *arg)
{
    transparency = arg->rrGetTransp();
    reflection = arg->rrGetRef();
    size = arg->rrGetSize();
    coord = arg->rrGetCoord();
    reversal = arg->rrGetRev();
    amb = arg->rrGetAmb();
    diff = arg->rrGetdiff();
    spec = arg->rrGetSpec();
}

void RRPrim::rrSetPrim(bool ref, bool transp, RRVec3 s, RRVec3 c, int rev, RRVec4 a, RRVec4 d, float sp)
{
    reflection = ref;
    transparency = transp;
    size = s;
    coord = c;
    reversal = rev;
    amb = a;
    diff = d;
    spec = sp;
}

void RRPrim::rrSetLight(RRLight arg){
    light = arg;
}

